<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="renderer" content="webkit">
		<title></title>
<link rel="shortcut icon" th:href="@{/i mages/favicon.ico}"/>
<link rel="stylesheet" th:href="@{/css/css_x/centro/pintuer.css}">
<link rel="stylesheet" th:href="@{/css/css_x/centro/admin.css}">
<script th:src="@{/js/js_x/fondo/jquery.js}"></script>
<script th:src="@{/js/js_x/reservation/pintuer.js}"></script>
	</head>
	<body>
		<div class="panel admin-panel">
			<div class="panel-head" id="add"><strong>添加管理员</strong></div>
			<div class="body-content" style="padding-left: 30%;width: 120%;">
				<form method="post" class="form-x" th:action="@{add_admin}">
					<!--如果flag的值为false，弹出弹窗-->
					<input type="hidden" id = "judge" th:value="${flag}">
					<div class="form-group">
						<div class="label">
							<label>管理员名称：</label>
						</div>
						<div class="field">
							<input type="text" class="input w50" id="name" value="" name="name" data-validate="required:请输入名字" />
							<div class="tips"></div>
						</div>
					</div>
					<div class="form-group">
						<div class="label">
							<label>账号：</label>
						</div>
						<div class="field">
							<input type="text" class="input w50" id="adminNumber" value="" name="adminNumber" data-validate="required:请输入账号" />
							<div class="tips"></div>
						</div>
					</div>
					<div class="form-group">
						<div class="label">
							<label>密码：</label>
						</div>
						<div class="field">
							<input type="text" class="input w50" id="password" value="" name="password" data-validate="required:请输入密码" />
							<div class="tips"></div>
						</div>
					</div>
					<div class="form-group">
						<div class="label">
							<label></label>
						</div>
						<div class="field">
							<button class="button bg-main" type="submit"> 提交</button>
						</div>
					</div>
				</form>
			</div>
		</div>

	</body>
<script type="text/javascript">

	//加载页面进行判断，如果flag = false ，跳出弹窗
	$(function () {
		if($("#judge").val() == "false"){
			alert("对不起，账号已存在！");
		}
	});

</script>
</html>
